package com.yh.doing.Mediator;

/**
 * @program: design-patterns
 * @description: ${description}
 * @author: yangh0597@163.com
 * @date: 2021-03-11 00:35
 * @problem:
 **/
public class Client {
    public static void main(String[] args) {
        MyMediator myMediator = new MyMediator();
        ESColleague esColleague = new ESColleague(myMediator);
        RedisColleague redisColleague = new RedisColleague(myMediator);
        MysqlColleague mysqlColleague = new MysqlColleague(myMediator);
        myMediator.setEsColleague(esColleague);
        myMediator.setMysqlColleague(mysqlColleague);
        myMediator.setRedisColleague(redisColleague);
        mysqlColleague.mediatorExecutor("aa");

    }
}
